' v2.71 - Reduced the chip RAM requirement by 450K (22/12/98)
' v2.72 - Bugs fixed (22/12/98)
' v2.73 - Instructions updated (23/12/98)
' v2.74 - Made title screen more efficient (23/12/98)
' v2.75 - Added buttons to scroll around tank (24/12/98)
' v2.76 - Decrunching picture changed (27/12/98)
' v2.77 - You can now add and remove MODs from the 'Music' directory! (27/12/98)
' v2.78 - Updated instructions and fixed bugs (27/12/98)
' v2.79 - A few more minor bugs fixed (23/1/99)
' v2.80 - THIRD AMINET RELEASE - almost exactly 2 years since the previous release! (23/1/99)
' To do: - Demo mode
' - Adaptive CPU IQ
' - Load/save game
' - Level generation progress meter
' - New deaths
' - Add "Destruction rating"
' - New weapons: Dirt inverter
' - Longer intro, but skippable
' - Money gained so far (along top)
' - Information about the other players (health, shield, money) - along top, turn on and off
' - Simultaneous mode
' - Multiple Sound FX files
' - Make random level generator use objects
' - Improve players' random starting point positioning
' - Improve support for loading Worms levels (make screen 960*350)
' - Escape whilst shoot
' - No dirt-based weapons should be allowed when dirt-drop is off
' - Add keyboard equivalents to the title screen
' - Do not use external error message handler
' - Teleporters should cut through ceiling
' - Add a little animation when a player surrenders
' - New level type: Jungle
' - More shield types: Bounce, Teleport and Reverse
' - Improve tank's appearance
' - Implement 'Charr' weapon system
' - Add icons for small angle and power adjustments
' - Make tanks tougher
' - Make shields worse
' - Each CPU player should have individually configured IQ
' - Make tanks angle level with the ground
' - Make tanks mobile
' - 'About' screen: - Graphs of weapon use
' - Add stats on defence items bought
' Known/suspected bugs: - Tanks rest against edge of screen?
' - Explosions bugger up in bitmap mode?
Set Buffer 100
Set Stack 1000
Trap Screen Close 0
Hide On
Degree
Global _VER$
_VER$="v2.80"
_CHIP=1000000-Chip Free
_FAST=500000-Fast Free+Max(1,-_CHIP)
If _CHIP>0 or _FAST>0
_OUTOFMEMORY[_CHIP,_FAST]
End If
If Prg State<>1
Amos To Front
Amos Lock
Break Off
Else
Dir$="idh1:my stuff/frontalassault/"
End If
' Establish location of files
Global _MUSICDISK$,_LEVELSDISK$,_TALKDISK$
_MUSICDISK$=Dir$+"Music/"
_LEVELSDISK$=Dir$+"Levels/"
_TALKDISK$=Dir$+"Talk/"
Global _NTSC,_PALADD
If Ntsc=0
_NTSC=0
_PALADD=56
Else
_NTSC=1
_PALADD=0
End If
' Setup variables
Dim _PLX(6),_PLY(6),_PLCASH(6),_PLANGLE(6),_PLPOWER(6),_PLHEALTH(6),_PLSHIELD(6),_WEAPUSED(99),_WEAP$(99),_WEAPCOST(99),_PLWEAP(6),_PLMAP(6),_PLOFX(6),_PLOFY(6),_PLNAME$(6),_DEFENCE$(99),_DEFENCECOST(99),_PLDEFENCE(6)
Dim _PLNUMPARACHUTES(6),_PLSHIELDTYPE(6),_PLTYPE(6),_PLHIT(6),_PLFIRED(6),_PLKILLS(6),_PLDEATHS(6),_WEAPCODE(99),_PLAYED(99),_LINES$(250),_OLDX(1),_OLDY(1),_OLDC(1),_PLSHOPPOS(6)
Global _PLX(),_PLY(),_PLCASH(),_PLANGLE(),_PLPOWER(),_PLHEALTH(),_PLSHIELD(),_HEIGHT,_OFX,_OFY,_WEAP$(),_WEAPCOST(),_PLWEAP(),_NUMWEAP,_PLMAP(),_PLOFX(),_PLOFY(),_PLNAME$(),_DEFENCE$(),_DEFENCECOST(),_OLDX(),_OLDY(),_OLDC()
Global _PLDEFENCE(),_PLNUMPARACHUTES(),_PLSHIELDTYPE(),_FIRPL,_PLTYPE(),_PLHIT(),_PLFIRED(),_HIT,_PLKILLS(),_PLDEATHS(),_WEAPCODE(),_GAP,_GAPPT,_INGAME,_PLAYED(),_PTUNE,_LINES$(),_NUMLINES,_OFLINES,_WEAPUSED(),_PREBUY,_SHOPPING
For Z=0 To 99
_PLAYED(Z)=1
Next
_PTUNE=-1
_INGAME=0
Dim _BX(9),_BY(9),_BXS(9),_BYS(9),_BT(9),_EDGE$(3),SPY(959),_LEVELTYPEON(6),_TUNE$(99)
Dim _EX(9),_EY(9),_ET(9),_ORDER(13),_ORDER2(6),_PLALIVE(6),_LEVEL$(999),_LEVELDISK(999),_ROUND(99)
Global _EX(),_EY(),_ET(),_EDGE$(),_WINNER,_PREVY1,_PREVY2,_PLALIVE(),_NUMLEVELS,_CHANGED2,_SPECIALQUIT,_FORCEDROP,_TANKS_DESTROYED,_SHOTS_FIRED,_ROUNDS_PLAYED,_TOTAL_PLAYTIME,_TIMES_LOADED,_PLSHOPPOS(),_TUNE$()
Global _TYPE,_GRAVITY,_EDGETYPE,_WIND,_ROUND,_NUMDEFENCE,_NUMROUNDS,_CH,_AUDIO,_TMODE,_TERRAIN,_TIME,_STARTCASH,_INTEREST,_ORDER(),_ORDER2(),_LEVEL$(),_ROUND(),_LEVELDISK(),_CPUWEAP,_LEVELTYPEON(),_PRN,_PRHELP
Global _BX(),_BY(),_BXS(),_BYS(),_BT(),_GENEROSITY,_HITX,_HITY,_IQ,_CURRPAGE,_WMODE,_TURBO,_SKIPVBL,_TRAINING,_FREESCREEN,_BITMAPLEVEL,_CURRX,SPY(),_TURBOTEMP,_DROPY,_DROPYS,_DROPX,_DROPAY,_AUTORANDOMIZE,_NUMTUNES
_PRN=-1
_PRHELP=-1
_SHOPPING=0
_FORCEDROP=0
_CH=0
_CURRPAGE=0
_LOADEDCONFIG=0
_SPECIALQUIT=0
' Initialise chunky screen (used for fire effect during intro)
Dim _CHUNKY_STORE(17)
Global _CHUNKY_SB,_CHUNKY_STORE()
' Read tunes
D$= Extension_18_02DE(_MUSICDISK$)
_NUMTUNES=-1
Repeat
D$= Extension_18_02EE
If D$<>""
Inc _NUMTUNES
_TUNE$(_NUMTUNES)=Upper$(D$)
_PLAYED(_NUMTUNES)=0
End If
Until D$=""
If _NUMTUNES=-1
N= Extension_18_09E8("Error: There must be at least one tune in","the 'Music' directory to load Frontal Assault.","Please add a tune to this directory and try again.","Quit","Quit")
_DOMESSAGE["General","Reading game configuration"]
D$= Extension_18_02DE(_LEVELSDISK$)
_NUMLEVELS=0
Repeat
D$= Extension_18_02EE
If D$<>""
If Upper$(Right$(D$,4))=".MAP"
Inc _NUMLEVELS
_LEVEL$(_NUMLEVELS)=Upper$(D$)-".MAP"
End If
End If
Until D$=""
If _NUMLEVELS=-1
N= Extension_18_09E8("Error: There must be at least one level in","the 'Levels' directory to load Frontal Assault.","Please add a level to this directory and try again.","Quit","Quit")
End
End If
CN=1
For Z=1 To 99
_ROUND(Z)=CN
Add CN,1,1 To _NUMLEVELS
Next
' Setup configuration
_NUMROUNDS=15
_IQ=100
_TYPE=1
_GRAVITY=1000
_STARTCASH=250
_AUDIO=0
_INTEREST=105
_TMODE=0
_GENEROSITY=2
_WMODE=1
_TURBO=0
_TRAINING=0
_BITMAPLEVEL=0
_CPUWEAP=0
_TANKS_DESTROYED=0
_SHOTS_FIRED=0
_ROUNDS_PLAYED=0
_TOTAL_PLAYTIME=0
_TIMES_LOADED=0
_AUTORANDOMIZE=1
For Z=1 To 6
_LEVELTYPEON(Z)=1
Next
Restore _PLAYERDAT
For Z=0 To 6
Read _PLNAME$(Z)
Read _PLTYPE(Z)
Next
For Z=0 To 99
_WEAPUSED(Z)=0
Next
If Exist("S:FrontalAssault.Dat")
' Load it
Open In 1,"S:FrontalAssault.Dat"
Input #1,_TEMP
If _TEMP=-1
Input #1,_AUTORANDOMIZE
Input #1,_IQ
Else
_IQ=_TEMP
End If
Input #1,_TYPE
Input #1,_GRAVITY
Input #1,_STARTCASH
Input #1,_AUDIO
Input #1,_INTEREST
Input #1,_TMODE
Input #1,_GENEROSITY
Input #1,_WMODE
Input #1,_TURBO
Input #1,_TRAINING
Input #1,_BITMAPLEVEL
Input #1,_CPUWEAP
Input #1,_TANKS_DESTROYED
Input #1,_SHOTS_FIRED
Input #1,_ROUNDS_PLAYED
Input #1,_TOTAL_PLAYTIME
Input #1,_TIMES_LOADED
For Z=0 To 99
Input #1,_WEAPUSED(Z)
Next
For Z=1 To 6
Input #1,_LEVELTYPEON(Z)
Next
For Z=0 To 6
Input #1,_PLNAME$(Z)
Input #1,_PLTYPE(Z)
Next
Input #1,_NUMROUNDS
For Z=1 To _NUMROUNDS
Input #1,_ROUNDNAME$
_ROUNDNAME$=Upper$(_ROUNDNAME$)
_FOUND=0
For TMP=1 To _NUMLEVELS
If Upper$(_LEVEL$(TMP))=_ROUNDNAME$
_FOUND=TMP
TMP=_NUMLEVELS+1
End If
Next
If _FOUND=0
_ROUND(Z)=1
Else
_ROUND(Z)=_FOUND
End If
Next
_LOADEDCONFIG=1
Close 1
End If
Inc _TIMES_LOADED
' Load talk files
Dim _SHOOTMESSAGE$(999),_DEATHMESSAGE$(999)
Global _NUMSHOOTMESSAGE,_SHOOTMESSAGE$(),_NUMDEATHMESSAGE,_DEATHMESSAGE$()
Set Input 10,-1
Open In 1,_TALKDISK$+"Shoot.TXT"
_NUMSHOOTMESSAGE=0
Repeat
Line Input #1,N$
_SHOOTMESSAGE$(_NUMSHOOTMESSAGE)=N$
Inc _NUMSHOOTMESSAGE
Until Eof(1)
Close 1
Open In 1,_TALKDISK$+"Die.TXT"
_NUMDEATHMESSAGE=0
Repeat
Line Input #1,_DEATHMESSAGE$(_NUMDEATHMESSAGE)
Inc _NUMDEATHMESSAGE
Until Eof(1)
Close 1
_DOMESSAGE["Graphics","Rendering tank images"]
Erase 1
Unpack 11 To 0
If Prg State<>1
Erase 11
End If
Screen Hide 0
Screen Open 1,320,256,4,Lowres
Screen Hide 1
Flash Off
Curs Off
Cls 0
Dim _BOBNUM(180,4,1)
Global _BOBNUM()
For PL=0 To 1
For T=0 To 4
CX=(T*15)+(PL*75)
For D=-180 To 0 Step 6
Ink 0,0,0
Bar 0,0 To 16,16
Screen Copy 0,CX,0,CX+15,17 To 1,0,0
Ink 3-PL,0,0
ADX=Cos(D)*8
ADY=Sin(D)*8
Draw 7,8 To 7+ADX,8+ADY
_GTBOB[0,0,15,17]
_BOBNUM(D+180,T,PL)=NNN
If D<0
For A=1 To 5
_BOBNUM(A+D+180,T,PL)=NNN
Next
End If
Next
Next
Next
Screen Close 1
_DOMESSAGE["Graphics","Grabbing images for the status bar"]
Unpack 10 To 0
Screen Hide 0
For Y=186 To 204 Step 6
If Y>192
For X=0 To 232 Step 4
_GTBOB[X,Y,X+1,Y+1]
Next
Else
For X=0 To 232 Step 4
_GTBOB[X,Y,X+4,Y+6]
Next
End If
Next
_GTBOB[192,150,202,160]
_GTBOB[203,150,211,158]
_GTBOB[214,150,223,158]
_DOMESSAGE["Graphics","Rendering nukes"]
Unpack 15 To 0
If Prg State<>1
Erase 15
End If
Screen Hide 0
PREV=100
Ink 0,0,0
For SIZ=70 To 30 Step -20
For Z=PREV To SIZ Step -1
Circle 70,70,Z
Circle 70,71,Z
Next
PREV=SIZ
_GTBOB[0,0,141,141]
Next
_DOMESSAGE["Graphics","Grabbing images for the information screen"]
Unpack 16 To 0
Screen Hide 0
For Y=129 To 179 Step 6
For X=3 To 231 Step 4
_GTBOB[X,Y,X+4,Y+6]
Next
Next
_GTBOB[0,184,143,195]
_GTBOB[0,196,79,207]
_GTBOB[0,208,101,219]
_DOMESSAGE["Graphics","Grabbing images for the title screen"]
Data $1F,$1F,$2F,$2F,$3F,$3F,$4F,$4F,$5F,$5F,$6F,$6F,$7F,$7F,$8F,$8F,$9F,$9F,$AF,$AF,$BF,$BF,$CF,$CF,$DF,$DF,$EF,$EF,$FF,$FF
Data $1FF,$2FF,$3FF,$4FF,$5FF,$6FF,$7FF,$8FF,$9FF,$AFF,$BFF,$CFF,$DFF,$EFF,$FFF,$FFF,$FFF,$FFF,$FFF,$FFF
_RAINDAT2:
Data $100,$200,$300,$400,$500,$600,$700,$800,$900,$A00,$B00,$C00,$D00,$E00,$F00
Data $F10,$F10,$F20,$F20,$F30,$F30,$F40,$F40,$F50,$F50,$F60,$F60,$F70,$F70,$F80,$F80,$F90,$F90,$FA0,$FA0,$FB0,$FB0,$FC0,$FC0,$FD0,$FD0,$FE0,$FE0,$FF0,$FF0
Data $FF1,$FF2,$FF3,$FF4,$FF5,$FF6,$FF7,$FF8,$FF9,$FFA,$FFB,$FFC,$FFD,$FFE,$FFF,$FFF,$FFF,$FFF,$FFF,$FFF
N= Extension_18_09D6("Warning: Not enough memory to execute correctly!",_MES$,"If you click on 'ignore' the game may work for a while, but will","probably eventually exit with an 'Out of Memory' error.","Ignore","Quit")